/*!
 * SPDX-License-Identifier: Apache-2.0
 *
 * The OpenSearch Contributors require contributions made to
 * this file be licensed under the Apache-2.0 license or a
 * compatible open source license.
 *
 * Modifications Copyright OpenSearch Contributors. See
 * GitHub history for details.
 */

.ouiComboBoxOption {
  font-size: $ouiFontSizeS;
  padding: $ouiSizeXS $ouiSizeS $ouiSizeXS #{$ouiSizeM + $ouiSizeXS};
  width: 100%;
  text-align: left;
  border: $ouiBorderThin;
  border-color: transparent;
  display: flex;
  align-items: center;

  &:hover {
    text-decoration: underline;
  }

  &.ouiComboBoxOption-isFocused {
    cursor: pointer;
    color: $ouiColorPrimaryText;
    background-color: $ouiFocusBackgroundColor;
  }

  &.ouiComboBoxOption-isDisabled {
    color: $ouiColorMediumShade;
    cursor: not-allowed;

    &:hover {
      text-decoration: none;
    }
  }
}

.ouiComboBoxOption__contentWrapper {
  display: flex;

  .ouiComboBoxOption__emptyStateText {
    flex: 1;
    text-align: left;
    margin-bottom: 0;
  }

  .ouiComboBoxOption__enterBadge {
    align-self: flex-start;
    margin-left: $ouiSizeXS;
  }
}

.ouiComboBoxOption__content {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  text-align: left;
}
